<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>vue组件</title>
    <script src="using/vue.js"></script>
    <script src="fastdialog/fastdialog.js"></script>
    <link rel="stylesheet" href="fastdialog/fastdialog.css">
    </link>
</head>

<body>
    <div id="app1">
        <button @click="commonopen">打开窗口</button>
        <button @click="commonopenwithpercent">按百分比打开窗口</button>
        <button @click="openwithcallback">打开窗口（关闭窗口有回调函数）</button>
        <button @click="openwithcallbackreturn">打开窗口（关闭窗口有回调函数，回掉函数包含返回值）</button>
        <button @click="openwithcallbackandparams">打开窗口（有回调函数并传参）</button>
        <button @click="openalert">弹出普通提示</button>
        <button @click="openalertwithcallback">弹出普通提示（关闭后执行回调函数）</button>
        <button @click="opensuccess">弹出成功提示</button>
        <button @click="openwaring">弹出警告提示</button>
        <button @click="openfail">弹出失败提示</button>
        <button @click="openconfirm">弹出确认框</button>
        <button @click="openownconfirm">弹出确认框(自定义按钮文字)</button>
    </div>

</body>
<script>
    /*定义vue实例app1*/
    var app1 = new Vue({
        el: '#app1',
        methods: {
            commonopen: function () {
                OpenDialog("111", "打开窗口", "newpage1.html", "600", "1200");
            },
            commonopenwithpercent:function(){
                OpenTopDialog("111", "打开窗口", "newpage1.html", "70", "80",null,null,"%");
            },
            openwithcallback: function () {
                OpenDialog("222", "关闭窗口有回调函数", "newpage1.html", "600", "1200", AfterClose);
            },
            openwithcallbackreturn: function () {
                OpenDialog("333", "回掉函数包含返回值", "newpage1.html", "600", "1200", AfterCloseWithReturn);
            },
            openwithcallbackandparams: function () {
                OpenDialog("444", "有回调函数并传参", "newpage1.html", "600", "1200", AfterCloseWithReturn, "125sds");
            },
            openalert: function () {
                OpenAlert("提示", "请在规定期限内处理完成！");
            },
            openalertwithcallback: function () {
                OpenAlert("提示", "请在规定期限内处理完成！",AfterClose);
            },
            
            opensuccess: function () {
                OpenSuccess("提示", "请在规定期限内处理完成！");
            },
            openwaring: function () {
                OpenWaring("提示", "请在规定期限内处理完成！",null,"知道了");
            },
            openfail: function () {
                OpenFail("提示", "请在规定期限内处理完成！");
            },
            openconfirm: function () {
                OpenConfirm("确认提示", "是否删除当前数据", function () {
                    OpenSuccess("提示", "删除成功");
                });
            },
            openownconfirm: function () {
                OpenConfirm("确认提示", "是否删除当前数据", function () {

                }, "确认删除", "取消操作");
            }


        }
    });

    function AfterClose() {
        alert("回掉事件");
    }
    function AfterCloseWithReturn(ReturnValue) {
        alert("page1回传的参数：" + ReturnValue);
    }
</script>

</html>